﻿using ABPxNext_WebApi.Models;
using ABPxNext_WebApi.Repositorys;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Modularity;

namespace ABPxNext_WebApi.Service
{
    /// <summary>
    /// 用户Service实现类
    /// </summary> 
    [Dependency(ServiceLifetime.Singleton)]
    public class UserService : IUserService
    {
        public IUserRepository Repository { get; set; }

        /// <summary>
        /// 添加用户
        /// </summary>
        /// <param name="user"></param>
        /// <exception cref="NotImplementedException"></exception>
        public void Add(UserModel user)
        {
            Console.WriteLine("实现用户注册逻辑。");


            Console.WriteLine("使用用户注册到数据库。");

            Repository.Inset(user);
        }
    }
}
